package com.guigusuqi.activiti.service;

import com.guigusuqi.activiti.dto.TbInsertEvection;
import com.guigusuqi.activiti.entity.TbEvection;
import com.baomidou.mybatisplus.extension.service.IService;
import org.activiti.engine.history.HistoricTaskInstance;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author suqi
 * @since 2023-06-15
 */
public interface TbEvectionService extends IService<TbEvection> {

    /**
     * 新增出差申请
     * @param insertEvection
     */
    String createEvection(TbInsertEvection insertEvection);

    /**
     * 获取用户的审批流程列表
     * @return
     */
    List<Map<String, Object>> listEvectionByUserId();

    /**
     * 完成任务
     * @param remark
     * @param taskId
     * @param userId
     */
    void completeTask(String remark, String taskId, String userId);

    /**
     * 获取用户历史的审批流程列表
     * @return
     */
    List<HistoricTaskInstance> listHistoryEvectionByUserId();
}
